package org.example.car.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.example.car.system.domain.SysPost;
import org.example.car.system.mapper.SysPostMapper;
import org.example.car.system.service.SysPostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 86183
* @description 针对表【SYS_POST】的数据库操作Service实现
* @createDate 2024-06-21 19:39:36
*/
@Service
public class SysPostServiceImpl extends ServiceImpl<SysPostMapper, SysPost>
    implements SysPostService {

    @Autowired
    SysPostMapper sysPostMapper;


    @Override
    public Boolean del(Integer postId) {
        return sysPostMapper.del(postId);
    }

    @Override
    public PageInfo<SysPost> getlist(SysPost sysPost) {
        PageHelper.startPage(sysPost.getPageNum(),sysPost.getPageSize());
        List<SysPost> getlist = sysPostMapper.getlist(sysPost);
        return new PageInfo<>(getlist);
    }

    @Override
    public List<SysPost> selectAll() {
        return sysPostMapper.selectAll();
    }
}




